﻿using System;
using System.Web;
using System.Web.Routing;

namespace BlueSky.Web.Routing
{
    /// <summary>
    /// IsAuthenticated route constraint.
    /// </summary>
    public class IsAuthenticatedConstraint : IRouteConstraint
    {        
        public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
        {
            return httpContext.Request.IsAuthenticated;
        }        
    }
}
